<template>
  <div>user</div>
  <span>{{userStoreData.fullName}}</span>
  <button @click="changeUsernameStore">修改</button>
</template>

<script lang='ts' setup>
import {userStore} from "@/store/userStore"
const userStoreData = userStore()
console.log(userStoreData.username);
console.log(userStoreData.fullName);

const changeUsernameStore = ()=>{
  // userStoreData.changeUsername("xiaofeifei")
  userStoreData.asyncChangeUsername("xiaofeifei123")
}

</script>

<style lang='scss' scoped>
</style>